<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="author" content="姜启航">
    <title></title>
    <style>
    span{
        display: inline-block;
        width: 80px;
        height: 30px;
        line-height: 30px;
         border:1px solid #aaa; 
        text-align: center;
        /* margin-left: 1px; */
    }
    span:hover{
        cursor: pointer;
    }
    .box{
        width: 162px;
         height: 100px; 
        display: flex;
       
    }
    ul{
        margin: 0;
        padding: 0;
        list-style: none;
        text-align: center;
           display: none;   
    }
    ul>li{
        height: 25px;
        border: 1px solid #aaa;
    }
    ul>li:hover{
        background-color: #aaa;
    }
    </style>
</head>
<body>

<div class="box">
  
        <span class="xs">销售订单<ul class="xiaoshou">
            <li>订单1</li>
            <li>订单2</li>
            <li>订单3</li>
        </ul></span>
        <span class="xf">消费订单
            <ul class="xiaofei">
            <li>消费1</li>
            <li>消费2</li>
            <li>消费3</li>
        </ul>
    </span>
</div>
<p>00</p> 
<script src="../jquery.js"></script>
</body>
</html>

<script>
    $('.xs').hover(function(){
        $('.xiaoshou').css('display','block');
    },function(){
      $('.xiaoshou').css('display','none');
    })
    $('.xf').hover(function(){
        $('.xiaofei').css('display','block');
    },function(){
      $('.xiaofei').css('display','none');
    })
    $('li').click(function(ev){
        $('p').html($(this).html());
        $('.xiaoshou').css('display','none');
        $('.xiaofei').css('display','none');
    })
   






</script>